

libmystdio.so:my_stdio.o my_string.o
	#@ar -rc $@ $^
	#@ echo "build %^ to $@ ... done"
	gcc -o $@ $^ -shared
%.o:%.c
	@gcc -c $< -fPIC
	@ echo "compling %< to $@ ... done"

.PHONY:clean
clean:
	@rm -rf *.so *.o stdc*
	@echo "clean ... done"

.PHONY:output
output:
	@mkdir -p stdc/include
	@mkdir -p stdc/lib 
	@cp -f *.so stdc/lib 
	@cp -f *.h stdc/include
	@tar -czf stdc.tgz stdc 
	@echo "output stdc ... done"
